import { request } from './request'

export function getdetail(iid) {
  return request({
    url: "/detail",
    params: {
      iid
    }
  })
}
export function getrecommend() {
  return request({
    url: "/recommend"
  })
}

export class Goodinfo {
  constructor(iteminfo, columns, services) {
    this.topimg = iteminfo.topImages
    this.desc = iteminfo.desc
    this.newprice = iteminfo.price
    this.oldprice = iteminfo.oldPrice
    this.discount = iteminfo.discountDesc
    this.columns = columns
    this.services = services
    this.realprice = iteminfo.lowNowPrice

  }
}

export class Shopinfo {
  constructor(shopInfo) {
    this.logo = shopInfo.shopLogo
    this.name = shopInfo.name
    this.fans = shopInfo.cFans
    this.sell = shopInfo.cSells
    this.score = shopInfo.score
    this.cgoods = shopInfo.cGoods
  }
}